[Contents]
[Index]
[Help]
[Browse <]
[Browse >]
Custom Handlers for Listers: dropfrom
This is basically the same as the drop event, except that it indicates a
drop from a lister rather than a drop to one.
The message arguments are:-
Arg0 - "dropfrom" (a string indicating the event type)
Arg1 - <handle> (source lister handle)
Arg2 - <names> (filenames)
Arg3 - <handle> (destination lister handle)
Arg4 - undefined
Arg5 - <destination> (path the file was dropped into)
Arg6 - <qualifiers> (string indicating qualifiers pressed
- shift, alt, control keys, or whether drop
was over a sub-directory)
The filenames are separated by spaces (if there is more than one), and will
be within quotes if the quotes keyword was specified for the
lister set handler command.
Arg5 of the 'dropfrom' custom handler message contains the destination
path; that is, the path that the file was dropped into. If the file was
dropped onto an icon, the destination path will be that of the object it
was dropped onto. For example, if a file from your custom lister is dropped
onto the Prefs icon in the Workbench lister, Arg5 will contain
"DH0:Prefs/", while Arg3 will contain the handle of the destination lister.
If Arg3 is 0 the drop was probably to the desktop. If the file was dropped
onto an icon on the desktop, Arg5 will contain the path. If the file was
dropped onto empty space on the desktop, Arg5 will contain the string
'desktop'. If you get the string 'desktop' you can find the proper path to
copy the file to (or whatever) using the getdesktop command.
If the files are dropped over a sub-directory in the lister then Arg6 will
contain the qualifier 'subdrop', providing that the handler was invoked using
lister set handler with the subdrop keyword.
Note that if the user drops a file onto an icon that is not a disk or a
drawer, you will still get the full pathname of the icon in Arg5. It is up
to you to determine whether the given destination path is a drawer or a
file and act appropriately.
Also note: the old Arg3 was a little bit confusing; it was the
destination lister handle if there was one, otherwise it was the source
lister handle. This has now been changed; Arg3 is ALWAYS the destination
lister handle, and 0 if there is none. Arg1 is still the source
lister handle.
You should not rely on the ARexx Word() function to traverse the list
of filenames because it does not support quotes and any name with a space
in it will cause your script to malfunction.
Note that appicons can also receive dropfrom events but they have
slightly different arguments. They can be distinguished by the word
"icon" always present in Arg4. See the appicons section.
Converted on 04 Nov 1998 with RexxDoesAmigaGuide2HTML 2.2 by Michael Ranner.